//自定义插件没有配置config.xml和cordova_plugins.js直接调用
function sayHello() {
    cordova.exec(function(result){
        console.log("result:"+result);
    },function(error){
        console.log("result:"+error);
    },"TestPlugin", "eayHello", []);
}

function openSystemBrowser() {
    cordova.exec(function(result){
        console.log("result:"+result);
    },function(error){
        console.log("result:"+error);
    },"TestPlugin", "openSystemBrowser", ['https://developer.huawei.com']);
}

function openOtherPage() {
    cordova.exec(function(result){
        console.log("result:"+result);
    },function(error){
        console.log("result:"+error);
    },"TestPlugin", "openOtherPage", []);
}

function otherFunction() {
    cordova.exec(function(result){
        console.log("result:"+JSON.stringify(result));
    },function(error){
        console.log("result:"+error);
    },"TestPlugin", "otherFunction", []);
}

function postMessage() {
    cordova.exec(function(result){
        console.log("result:"+result);
    },function(error){
        console.log("result:"+error);
    },"TestPlugin", "postMessage", []);
}


function getConfigPreferences() {
    cordova.exec(function(result){
        console.log("result:"+result);
        document.getElementById("preferences").innerHTML = JSON.stringify(result);
    },function(error){
        console.log("result:"+error);
    },"TestPlugin", "getPreferences", []);
}